<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 
<meta name="keywords" content="carousel, jquery, responsive, fluid, elastic, resize, thumbnail, slider" />
<meta name="author" content="Codrops" />
<title>微评说客</title>
<link rel="stylesheet" type="text/css" href="style/public.css">
<link rel="stylesheet" type="text/css" href="style/style.css">
<link rel="stylesheet" type="text/css" href="style/font-awesome.css">
<script src="jquery/jquery-1.7.2.min.js"></script>
<script src="jquery/tab.js"></script>
<script type="text/javascript">
var index=0;
$(document).ready(function(e) {
    lr();
});
function lr(){
	$("#button2").click(function(){
		var template='<p id="prifx_{{index}}"><input type="text" placeholder="填写选择题答案"><a href="javascript:remove({{index}})">删除</a></p>';
		$("#mk3").append(template.replace(/{{index}}/g,index++));
	});
	$("#button3").click(function(){
		var template='<p id="prifx_{{index}}"><input type="text" placeholder="填写选择题答案"><a href="javascript:remove({{index}})">删除</a></p>';
		$("#mk4").append(template.replace(/{{index}}/g,index++));
	});
}
function remove(id){
	index--;
	$("#prifx_"+id).remove();
}	
</script>
<style>
	html,body{ background:#f2f2f2;}
</style>
</head>

<body>
<header class="index-header">
	<h1>题目编辑</h1>
    <a href="#" class="icon-circle-arrow-left kl"></a>
</header>

<section class="table2">
	<div class="tm">
    	<input type="text" placeholder="题目标题">
    </div>
	<div class="table2-title tab_title">
    	<ul>
    		<li class="current">单选题</li>
    		<li>多选题</li>
    		<li>问答题</li>
            <div class="clears"></div>
    	</ul>
    </div>
    <div class="table2-nr tab_nr">
    	<div class="bk1 tab_block">
        	<div class="bk1-content" id="mk3"></div>
            <span><input type="button" value="+添加选项" class="be1" id="button2"><input type="button" value="确认" class="be2"></span>
        </div>
    	<div class="bk2 tab_block" style="display:none">
            <div class="bk1-content" id="mk4"></div>
            <span><input type="button" value="+添加选项" class="be1" id="button3"><input type="button" value="确认" class="be2"></span>
        </div>
    	<div class="bk3 tab_block" style="display:none">
        	<textarea></textarea>
            <p><input type="button" value="确认"></p>
        </div>
    </div>
</section>
<div class="hh"></div>
<nav>
	<ul>
		<li>
        	<a href="index.html" class="n1">
				<p></p>
				<span>首页</span>
			</a>
        </li>
		<li>
        	<a href="The-questionnaire.html" class="n2">
				<p></p>
				<span>问卷</span>
			</a>
        </li>
		<li>
        	<a href="Post.html" class="n3">
				<p class="current"></p>
				<span class="current">发布</span>
			</a>
        </li>
		<li>
        	<a href="mine.html" class="n4">
				<p></p>
				<span>我的</span>
			</a>
        </li>
	</ul>
</nav>
</body>
</html>
